﻿using System;
using System.Runtime.Serialization;
using Utils;
namespace PH.Model.Achievements
{
    [DataContract]
    public class MarkModel:MBase
    {
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public int ID { get; set; }
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public System.Guid ArchiveGuid { get; set; }
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public int SchoolID { get; set; }
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public int GradeCode { get; set; }
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public Nullable<int> ClassID { get; set; }
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public int StudentID { get; set; }
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public byte Sex { get; set; }
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public int SubjectID { get; set; }
        [Model]
        [DataMember]
        public decimal Achievement { get; set; }
        [Model]
        [DataMember]
        public int Score { get; set; }
        [Model]
        [DataMember]
        public string Description { get; set; }
        [Model]
        [DataMember]
        public int AdditionalScore { get; set; }
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public Nullable<int> TeacherID { get; set; }
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public string StudentNo { get; set; }
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public byte TestMethod { get; set; }
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public string ClassName { get; set; }
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public bool AutoPass { get; set; }

        #region Help
        [DataMember]
        public Guid SchoolGuid { get; set; }
        [DataMember]
        public string SchoolName { get; set; }
        [DataMember]
        public string StudentName { get; set; }
        [DataMember]
        public Model.Standards.SubjectModel Subject { get; set; }
        #endregion
    }

    [DataContract]
    public class MarkCollection : ModelCollectionBase<MarkModel> { }

    public class MarkQuery : QueryBase
    {
        public Guid ArchiveGuid { get; set; }
        public Guid SchoolGuid { get; set; }
        public int ClassID { get; set; }
        public int SubjectID { get; set; }
        public byte Sex { get; set; }
        public Guid StudentGuid { get; set; }
        public bool? AutoPass { get; set; }
        public int StudentID { get; set; }

        public bool GetSchoolName { get; set; }
        public bool GetClassName { get; set; }
        public bool GetStudentName { get; set; }
        public bool GetSubject { get; set; }
    }
}
